<template>
  <div>
    <p>场景 1：collapse-tags 折叠</p>
    <br />
    <tiny-tree-select v-model="value" :tree-op="treeOp" multiple collapse-tags></tiny-tree-select>
    <br />
    <br />
    <p>场景 2：hover-expand 折叠</p>
    <br />
    <tiny-tree-select v-model="value" :tree-op="treeOp" multiple hover-expand></tiny-tree-select>
    <br />
    <br />
    <p>场景 3：click-expand 折叠</p>
    <br />
    <tiny-tree-select v-model="value" :tree-op="treeOp" multiple click-expand></tiny-tree-select>
  </div>
</template>

<script>
import { TinyTreeSelect } from '@opentiny/vue'

export default {
  components: {
    TinyTreeSelect
  },
  data() {
    return {
      value: [9, 6],
      treeOp: {
        data: [
          {
            value: 1,
            label: '一级 1',
            children: [
              {
                value: 4,
                label: '二级 1-1',
                children: [
                  {
                    value: 9,
                    label: '三级 1-1-1'
                  },
                  {
                    value: 10,
                    label: '三级 1-1-2'
                  }
                ]
              }
            ]
          },
          {
            value: 2,
            label: '一级 2',
            children: [
              {
                value: 5,
                label: '二级 2-1'
              },
              {
                value: 6,
                label: 'OpenTiny 是一套企业级 Web 前端开发解决方案，提供跨端、跨框架、跨版本的 TinyVue 组件库'
              }
            ]
          }
        ]
      }
    }
  }
}
</script>

<style scoped>
[data-tag='tiny-base-select'],
[data-tag='tiny-tree-select'] {
  width: 280px;
}
</style>
